-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: filter schemas by name #1135
Conversation
cmd/ftl/cmd_schema.go
Outdated
@@ -1,7 +1,7 @@ | |||
package main | |||
|
|||
type schemaCmd struct { | |||
Get getSchemaCmd `default:"" cmd:"" help:"Retrieve the cluster FTL schema."` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to preserve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it up so we can preserve it. See the PR description for the new interface.
Or is there a way to get the non-named arg within ftl schema get
with kong while maintaining the default cmd for ftl schema
? I figured you'd be the expert on that ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that looks good!
cmd/ftl/cmd_schema_get.go
Outdated
if !msg.More { | ||
break | ||
} | ||
} | ||
for name := range remainingNames { | ||
fmt.Fprintf(os.Stderr, "module %s not found\n", name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not formatted consistently with FTL's CLI, but just return it as an error listing all missing names, and you'll get that for free.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right it should go to stderr. --protobuf
now has the same behaviour
#1090
Allows filtering of schemas to the named modules.
If the input includes a module that was not found, it is returned as an error
The behaviour for these remains the same: